package mil.af.amc.adpetracker.dao;

import mil.af.amc.adpetracker.model.AdpeAccount;
import mil.af.amc.adpetracker.model.User;

import java.util.List;

/**
 * Interface for AdpeAccount DAO implementations
 *
 * @author TSgt Jason Ferguson
 */

public interface AdpeAccountDao extends GenericDao<AdpeAccount> {

    /**
     * Return a count of EquipmentItem objects for the AdpeAccount object
     * @param account   AdpeAccount object
     * @return int representing the count of EquipmentItem objects associated with the AdpeAccount object
     */
    int getEquipmentItemCount(AdpeAccount account);

    /**
     * Return the value of the EquipmentItem objects (in dollars)
     * TODO: switch this from a double
     *
     * @param account   AdpeAccount object to return the value of the EquipmentItem objects for
     * @return  a double representing the dollar value of the EquipmentItem objects associated with the AdpeAccount
     */
    double getAccountValue(final AdpeAccount account);

    /**
     * Return a List of AdpeAccount objects that a given User is a custodian for
     * @param user  User object
     * @return  a List of AdpeAccount objects that the User object is a custodian for
     */
    List<AdpeAccount> getAccountsByUser(User user);
}
